﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using Microsoft.Owin;
using Sharp.DataTransferObject;
using Sharp.Platform.Owin;

namespace Sharp.Platform
{
    public static class UserExtension
    {
        public static UserDTO ToDTO(this SharpUser user)
        {
            return new UserDTO()
            {
                Id = user.Id,
                UserName = user.UserName,
                Password = user.Password
            };
        }

        //public static SharpUser GetUser(this IOwinContext input)
        //{
        //    HttpContext.GetOwinContext().Authentication.User
        //}
    }
}
